package com.ruoyi.course.service.impl;

import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.course.mapper.CourseExRecordMapper;
import com.ruoyi.course.domain.CourseExRecord;
import com.ruoyi.course.service.ICourseExRecordService;

/**
 * 课件做题记录Service业务层处理
 *
 * @author zzx
 * @date 2023-05-05
 */
@Service
public class CourseExRecordServiceImpl implements ICourseExRecordService {

    @Autowired
    private CourseExRecordMapper courseExRecordMapper;

    /**
     * 查询课件做题记录
     *
     * @param id 课件做题记录主键
     * @return 课件做题记录
     */
    @Override
    public CourseExRecord selectCourseExRecordById(Long id) {
        return courseExRecordMapper.selectCourseExRecordById(id);
    }

    /**
     * 查询课件做题记录列表
     *
     * @param courseExRecord 课件做题记录
     * @return 课件做题记录
     */
    @Override
    public List<CourseExRecord> selectCourseExRecordList(CourseExRecord courseExRecord) {
        return courseExRecordMapper.selectCourseExRecordList(courseExRecord);
    }

    /**
     * 新增课件做题记录
     *
     * @param courseExRecord 课件做题记录
     * @return 结果
     */
    @Override
    public int insertCourseExRecord(CourseExRecord courseExRecord) {
                courseExRecord.setCreateTime(DateUtils.getNowDate());
            return courseExRecordMapper.insertCourseExRecord(courseExRecord);
    }

    /**
     * 修改课件做题记录
     *
     * @param courseExRecord 课件做题记录
     * @return 结果
     */
    @Override
    public int updateCourseExRecord(CourseExRecord courseExRecord) {
        return courseExRecordMapper.updateCourseExRecord(courseExRecord);
    }

    /**
     * 批量删除课件做题记录
     *
     * @param ids 需要删除的课件做题记录主键
     * @return 结果
     */
    @Override
    public int deleteCourseExRecordByIds(Long[] ids) {
        return courseExRecordMapper.deleteCourseExRecordByIds(ids);
    }

    /**
     * 删除课件做题记录信息
     *
     * @param id 课件做题记录主键
     * @return 结果
     */
    @Override
    public int deleteCourseExRecordById(Long id) {
        return courseExRecordMapper.deleteCourseExRecordById(id);
    }

    @Override
    public CourseExRecord selectCourseExRecordByWare(CourseExRecord record) {
        return courseExRecordMapper.selectCourseExRecordByWare(record);
    }
}
